<? include 'server_config.php'; 

if($user_idx=="")
{
	?>
	<script>
		location.href='login.php';
	</script>
	<?
	return;
}



$sql = "

INSERT INTO ndd_ra_score_input (user_idx, reg_date) VALUES ( $user_idx, CURRENT_DATE );

";

/*

, age, area, over_6weeks, symptom_1, symptom_2, symptom_3, symptom_4, symptom_5, symptom_6, symptom_7) VALUES 
( $user_idx, '$value', CURRENT_DATE);
*/

//echo $sql;

$result = mysql_query($sql,$connect);


//echo $age."/".$over_6weeks."/".$s1."/".$s2."/".$area."/".$know_rf."/".$rf;

$sql = "

UPDATE ndd_ra_score_input
SET 
	age = '$age',
	area = '$area',
	over_6weeks = '$over_6weeks',
	symptom_1 = '$s1',
	symptom_2 = '$s2',
	symptom_3 = '$s3',
	symptom_4 = '$s4',
	symptom_5 = '$s5',
	symptom_6 = '$s6',
	symptom_7 = '$s7',
	know_rf = $know_rf, rf = '$rf' , know_acpa = $know_acpa, acpa = '$acpa',
	know_crp = $know_crp, crp = '$crp' , know_esr = $know_esr, esr = '$esr'


WHERE user_idx = $user_idx AND reg_date = CURRENT_DATE ;
";

//echo $sql;
$result = mysql_query($sql,$connect);

//echo $result;



/*
<script> 
location.replace('5_1.php?view=rm');
//history.back();
//parent.location.reload();
</script>
*/

?>1